import { createRequest } from '@/request'

// 参与的项目列表
export const teacherTeacherProjectPage = data => {
  return createRequest({
    url: `/teacher/teacher-project/page`,
    method: 'get',
    params: data
  })
}

// 保存
export const teacherProjectSave = data => {
  return createRequest({
    url: `/teacher/project/save`,
    method: 'post',
		data
  })
}

// 上线
export const teacherProjectOnline = data => {
  return createRequest({
    url: `/teacher/project/online/${data.id}`,
    method: 'post',
		data
  })
}

// 下线
export const teacherProjectOffline = data => {
  return createRequest({
    url: `/teacher/project/offline/${data.id}`,
    method: 'post',
		data
  })
}

// 删除
export const teacherProjectDelete = data => {
  return createRequest({
    url: `/teacher/project/delete`,
    method: 'delete',
		data
  })
}

// 收藏
export const teacherCollectProjectCollect = data => {
  return createRequest({
    url: `/teacher/collect-project/collect/${data.id}`,
    method: 'post',
		data
  })
}

// 取消收藏
export const teacherCollectProjectCancelCollect = data => {
  return createRequest({
    url: `/teacher/collect-project/cancelCollect/${data.id}`,
    method: 'post',
		data
  })
}

// 项目详情
export const teacherProjectFindById = data => {
  return createRequest({
    url: `/teacher/project/findById/${data.id}`,
    method: 'get',
		data
  })
}

// 编辑
export const teacherProjectModify = data => {
  return createRequest({
    url: `/teacher/project/modify`,
    method: 'post',
		data
  })
}